<html>
<head><meta charset="utf-8"><title>Associated const as parameter · project-const-generics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/index.html">project-const-generics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html">Associated const as parameter</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="241704309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704309">(Jun 06 2021 at 18:32)</a>:</h4>
<p>Hey, how are you supposed to write the following? I would have expected this to work as is, but it doesn't and the error message suggestion also doesn't work AFAICT.</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="cp">#![feature(const_generics, const_evaluatable_checked)]</span><span class="w"></span>
<span class="cp">#![allow(incomplete_features)]</span><span class="w"></span>

<span class="cp">#[derive(Debug, Clone, Copy, PartialEq, Eq)]</span><span class="w"></span>
<span class="k">struct</span> <span class="nc">X</span><span class="p">;</span><span class="w"></span>

<span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">const</span><span class="w"> </span><span class="n">SIZE</span>: <span class="nc">X</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">trait</span><span class="w"> </span><span class="n">Bar</span>: <span class="nc">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>

<span class="w">    </span><span class="k">fn</span> <span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="bp">Self</span>::<span class="n">bar</span>::<span class="o">&lt;</span><span class="p">{</span><span class="w"> </span><span class="bp">Self</span>::<span class="n">SIZE</span><span class="w"> </span><span class="p">}</span><span class="o">&gt;</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="k">fn</span> <span class="nf">bar</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">SIZE</span>: <span class="nc">X</span><span class="o">&gt;</span><span class="p">();</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p><strong>Error</strong></p>
<div class="codehilite"><pre><span></span><code>error: unconstrained generic constant
  --&gt; src/lib.rs:11:21
   |
11 |         Self::bar::&lt;{ Self::SIZE }&gt;()
   |                     ^^^^^^^^^^^^^^
   |
   = help: try adding a `where` bound using this expression: `where [(); { Self::SIZE }]:`
</code></pre></div>



<a name="241704368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704368">(Jun 06 2021 at 18:33)</a>:</h4>
<p>oh yeah that error message is <em>wildly</em> bad for types that aren't <code>usize</code></p>



<a name="241704411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704411">(Jun 06 2021 at 18:34)</a>:</h4>
<p>const_evaluatable_checked wants to be able to prove that a given expression will evaluate successfully at compile time</p>



<a name="241704417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704417">(Jun 06 2021 at 18:34)</a>:</h4>
<p>associated constants dont have that guarantee because you can do like</p>



<a name="241704445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704445">(Jun 06 2021 at 18:34)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="kt">usize</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="kt">usize</span> <span class="o">=</span><span class="w"> </span><span class="kt">usize</span>::<span class="n">MAX</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="241704461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704461">(Jun 06 2021 at 18:35)</a>:</h4>
<p>so you need a where clause on <code>foo</code> to say that <code>Self::SIZE</code> will evaluate successfully</p>



<a name="241704482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704482">(Jun 06 2021 at 18:35)</a>:</h4>
<p>Why can they do that? How do I that for a struct?</p>



<a name="241704541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704541">(Jun 06 2021 at 18:36)</a>:</h4>
<p>if you use the expression anywhere in the fn signature/where clauses rustc will implicitly add a bound that it evaluates successfully</p>



<a name="241704569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704569">(Jun 06 2021 at 18:37)</a>:</h4>
<p>the diagnostic suggests <code>[(); { expr }]:</code> but this is really only correct for usize <span aria-label="frown" class="emoji emoji-1f641" role="img" title="frown">:frown:</span> </p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">struct</span> <span class="nc">XEvaluates</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="nc">X</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="k">fn</span> <span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">XEvaluates</span><span class="o">&lt;</span><span class="p">{</span><span class="bp">Self</span>::<span class="n">SIZE</span><span class="p">}</span><span class="o">&gt;</span>: <span class="p">{}</span><span class="w"></span>
</code></pre></div>



<a name="241704570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704570">(Jun 06 2021 at 18:37)</a>:</h4>
<p>I think this should work</p>



<a name="241704578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704578">(Jun 06 2021 at 18:37)</a>:</h4>
<p><span class="user-mention silent" data-user-id="219696">XAMPPRocky</span> <a href="#narrow/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter/near/241704482">said</a>:</p>
<blockquote>
<p>Why can they do that? How do I that for a struct?</p>
</blockquote>
<p>i dont know what you're asking "why can they do that"</p>



<a name="241704682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704682">(Jun 06 2021 at 18:39)</a>:</h4>
<p>As an aside: it would be nice if I could just write the following, but I understand there's issues with generic defaults on functions at the moment.</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">struct</span> <span class="nc">X</span><span class="p">;</span><span class="w"></span>

<span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">const</span><span class="w"> </span><span class="n">SIZE</span>: <span class="nc">X</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">trait</span><span class="w"> </span><span class="n">Bar</span>: <span class="nc">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">bar</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">SIZE</span>: <span class="nc">X</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="bp">Self</span>::<span class="n">SIZE</span><span class="w"> </span><span class="p">}</span><span class="o">&gt;</span><span class="p">();</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="241704738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704738">(Jun 06 2021 at 18:40)</a>:</h4>
<p><span class="user-mention silent" data-user-id="326176">Boxy [she/her]</span> <a href="#narrow/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter/near/241704569">said</a>:</p>
<blockquote>
<p>the diagnostic suggests <code>[(); { expr }]:</code> but this is really only correct for usize <span aria-label="frown" class="emoji emoji-1f641" role="img" title="frown">:frown:</span> </p>
<p><div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">struct</span> <span class="nc">XEvaluates</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="nc">X</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="k">fn</span> <span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">XEvaluates</span><span class="o">&lt;</span><span class="p">{</span><span class="bp">Self</span>::<span class="n">SIZE</span><span class="p">}</span><span class="o">&gt;</span>: <span class="p">{}</span><span class="w"></span>
</code></pre></div><br>
</p>
</blockquote>
<p>Thanks, I'll try this out!</p>



<a name="241704786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704786">(Jun 06 2021 at 18:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="326176">Boxy [she/her]</span> <a href="#narrow/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter/near/241704578">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="219696">XAMPPRocky</span> <a href="#narrow/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter/near/241704482">said</a>:</p>
<blockquote>
<p>Why can they do that? How do I that for a struct?</p>
</blockquote>
<p>i dont know what you're asking "why can they do that"</p>
</blockquote>
<p>Why can associated consts have expressions which are not proven to successfully validate at compile time?</p>



<a name="241704815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704815">(Jun 06 2021 at 18:42)</a>:</h4>
<p>ah uh</p>



<a name="241704850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704850">(Jun 06 2021 at 18:42)</a>:</h4>
<p>backwards compat I suppose</p>



<a name="241704859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704859">(Jun 06 2021 at 18:42)</a>:</h4>
<p>im not sure if its a design decision or not <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="241704867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704867">(Jun 06 2021 at 18:43)</a>:</h4>
<p>it would be nice if one day you could write like...</p>



<a name="241704879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704879">(Jun 06 2021 at 18:43)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">evaluatable</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="bp">Self</span>::<span class="n">AssocC</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="k">const</span><span class="w"> </span><span class="n">AssocC</span>: <span class="kt">usize</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="241704882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241704882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241704882">(Jun 06 2021 at 18:43)</a>:</h4>
<p>but that's a whiles off aha</p>



<a name="241706721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241706721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241706721">(Jun 06 2021 at 19:22)</a>:</h4>
<p>Would it need new syntax, or could the change be added through an edition like having 2024 requiring all associated consts be const evaluatable? I can’t imagine a use case for having consts that don’t work in certain const contexts. I would expect a value from one const definition to be able to be used at any const use site.</p>



<a name="241706756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241706756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241706756">(Jun 06 2021 at 19:23)</a>:</h4>
<p>I think 1. we will want some syntax <em>regardless</em> to express that a const must be evaluatable i.e.</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">fn</span> <span class="nf">foo</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="p">()</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">evaluatable</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="fm">assert!</span><span class="p">(</span><span class="n">N</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="cm">/* code */</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="241706765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241706765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241706765">(Jun 06 2021 at 19:23)</a>:</h4>
<p>I think that adding a rule that all assoc consts must evaluate successfully could be an edition change..?</p>



<a name="241706805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241706805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241706805">(Jun 06 2021 at 19:24)</a>:</h4>
<p>it <em>would</em> be a language change <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="241706813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/Associated%20const%20as%20parameter/near/241706813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/Associated.20const.20as.20parameter.html#241706813">(Jun 06 2021 at 19:24)</a>:</h4>
<p>whether that actually happens probably depends a loooot on the scale of breakage that comes from it</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>